package com.qqtech.qquan.mall.service;

import java.util.List;

import com.qqtech.core.common.exception.OrderException;
import com.qqtech.core.frame.model.Result;
import com.qqtech.core.frame.service.BaseService;
import com.qqtech.qquan.mall.model.MallOrder;
import com.qqtech.qquan.mall.model.MallOrderVo;
import com.qqtech.qquan.order.model.OrderBase;
import com.qqtech.qquan.order.model.OrderDelivery;
import com.qqtech.qquan.order.model.OrderItem;

public interface MallOrderService extends BaseService<MallOrder> {
	public MallOrder getByOrderNo(java.lang.String orderNo) ;
	
	/**
	 * 支付后订单失效时间
	 * @param key
	 * @return
	 */
	public String getAutoExpireTime(String key);
	
	/**
     *  商城-确认订单
     * @param orderBase
     * @param orderDelivery
     * @param orderItems
     * @return
     * @throws OrderException
     */
    public Result handleSaveOrder(OrderBase orderBase, OrderDelivery orderDelivery, List<OrderItem> orderItems,MallOrderVo mallOrderVo) throws OrderException;
    
    /**
     *  商城-取消订单
     * @throws OrderException
     */
    public Result handleCancelOrder(String orderNo) throws OrderException;
    
    /**
	 * 配送范围中心X坐标
	 * @param key
	 * @return
	 */
	public String getDistributionX(String key);
	
	/**
	 * 配送范围中心Y坐标
	 * @param key
	 * @return
	 */
	public String getDistributionY(String key);
	
	/**
	 * 配送范围半径
	 * @param key
	 * @return
	 */
	public String getDistributionRadius(String key);
	
	/**
	 * 满N元起送
	 * @param key
	 * @return
	 */
	public String getFreeDeliverValue(String key);
	/**
	 * 获取商城开放的社区
	 * @param key
	 * @return
	 */
	public String getMallHasOpenCommunityValue(String key);
	/**
	 * 圈圈配送配送费
	 * @param key
	 * @return
	 */
	public String getFreight(String key);
}